using System.IO;
using System.Web.UI;
using System.Web.UI.HtmlControls;

namespace Library.WebControls.SimplePanelCallback {
	public class SpPanelCallbackDesgin : System.Web.UI.Design.ContainerControlDesigner {
		public override string GetDesignTimeHtml() {
			SpPanelCallback panelCallback = (SpPanelCallback)Component;			
			StringWriter sw = new StringWriter();
			HtmlTextWriter tw = new HtmlTextWriter(sw);
			foreach (Control ctr in panelCallback.Controls) {
				ctr.RenderControl(tw);
			}

			if (panelCallback.Controls.Count > 0) {
				return sw.ToString();
			} else {
				return "<div style='border: solid 1px gray;'><h1>Panel Callback</h1></div>";
			}
		}
	}
}
